package cn.iocoder.yudao.module.agri.controller.admin.farmrecord.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.math.BigDecimal;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 农事记录 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class FarmRecordBaseVO {

    @Schema(description = "种养批次", requiredMode = Schema.RequiredMode.REQUIRED, example = "19623")
    @NotNull(message = "种养批次不能为空")
    private Long planId;

    @Schema(description = "农事类型", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "农事类型不能为空")
    private Integer farmingType;

    @Schema(description = "农事日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "农事日期不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime farmingDate;

    @Schema(description = "农事内容", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "农事内容不能为空")
    private String farming;

    @Schema(description = "作业数量")
    private Integer achievement;

    @Schema(description = "作业数量单位（株、棵、亩）")
    private String unit;

    @Schema(description = "农资及用量")
    private String materials;

    @Schema(description = "总开销", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "总开销不能为空")
    private BigDecimal amount;

    @Schema(description = "负责人")
    private String overseer;

    @Schema(description = "备注", example = "你说的对")
    private String remark;

}
